<?php
class Layout extends Zend_Layout_Controller_Plugin_Layout 
{ 
       public function preDispatch(Zend_Controller_Request_Abstract $request) 
       { 
          switch($request->getModuleName()){
            case 'admin':
               $this->setupLayout('admin');
               break;
            case 'app':
               $this->setupLayout('app');
            default:
          }
       } 
       protected function setupLayout($moduleName)
       {
           $this->getLayout()->setLayoutPath(APPLICATION_PATH .'/'. $moduleName . '/views/scripts' );
           $this->getLayout()->setLayout('layout');
       }
}